{template header}
<script src="{SITE_URL}public/js/jeditable/jeditable.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
$(function() {

$(".editable_textarea").editable("{SITE_URL}index.php?app=talk&ac=do&ts=edit_type", { 
  indicator : '<img src="'+siteUrl+'public/js/jeditable/indicator.gif">',
  type   : 'textarea',
  submitdata: { _method: "put"},
  select : true,
  submit : '{$TS_HL[app][1116]}',
  cancel : '{$TS_HL[app][1117]}',
  cssclass : "editable",
  tooltip   : '{$TS_HL[app][1118]}'
});

});

//删除宝贝类型
function deltopictype(typeid){
	if(confirm("{$TS_HL[app][1119]}")){
		$.ajax({
			type: "POST",
			url: siteUrl+'index.php?app=talk&ac=do&ts=del_type',
			data: "&typeid=" + typeid,
			beforeSend: function(){},
			success: function(result){
				if(result == '0'){
					alert('{$TS_HL[app][1119]}');
					window.location.reload(); 	
				}
			}
		});
	}
}

</script>

<!--main-->
<div class="midder">

<div class="mc">
{template edit_xbar}
<div class="cleft">

<div>
<!--{if $arrGroupType}-->
<table class="topictype" width="100%">
<!--{loop $arrGroupType $key $item}-->
<tr>
<td class="editable_textarea" id="{$item[typeid]}">{$item[typename]}</td><td><a href="javascript:void('0');" onclick="deltopictype('{$item[typeid]}')">{$TS_HL[app][1113]}</a></td>
</tr>
<!--{/loop}-->

</table>
<!--{/if}-->
</div>

<div style="margin-top:30px;">
<form method="POST" action="{SITE_URL}index.php?app=talk&ac=do&ts=topic_type">
{$TS_HL[app][1121]}
<input type="hidden" name="talkid" value="{$strGroup[talkid]}" />
<input name="typename" /> <input type="submit" value="{$TS_HL[app][1122]}" />
</form>
</div>



</div>

<div class="cright">

<p class="pl2">&gt; <a href="{SITE_URL}{tsurl('talk','talk',array(talkid=>$strGroup[talkid]))}">{$TS_HL[app][1109]}{$strGroup[talkname]}{$TS_HL[app][1110]}</a></p>

</div>

</div>

</div>
{template footer}